﻿'   FAHWatch7 project browser container class
'   Copyright (c) 2010 Marvin Westmaas ( MtM / Marvin_The_Martian )
'
'   This program is free software: you can redistribute it and/or modify
'   it under the terms of the GNU General Public License as published by
'   the Free Software Foundation, either version 3 of the License, or
'   (at your option) any later version.
'
'   This program is distributed in the hope that it will be useful,
'   but WITHOUT ANY WARRANTY; without even the implied warranty of
'   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'   GNU General Public License for more details.
'
'   You should have received a copy of the GNU General Public License
'   along with this program.  If not, see <http://www.gnu.org/licenses/>.
Public Class clsPBrowser
    Private _fpb As New frmPBList
    Private bFilled As Boolean = False
    Public ReadOnly Property IsActive As Boolean
        Get
            Return _fpb.Visible
        End Get
    End Property
    Public Sub ShowBrowser()
        Try
            _fpb.Show()
            While Not _fpb.Created
                Application.DoEvents()
            End While
            If Not bFilled Then
                _fpb.FillView()
                bFilled = True
            End If
            _fpb.Focus()
        Catch ex As Exception
            WriteError(ex.Message, Err)
        End Try
    End Sub
    Public Sub hideBrowser()
        _fpb.Hide()
    End Sub
    Public Sub CloseBrowser()
        _fpb.CloseForm()
    End Sub
End Class
